/**
 * @param {string} s
 * @param {string} p
 * @return {boolean}
 */
var isMatch = function (s, p) {
    if (p[p.length - 1] == "*") {
        return true;
    } else if (p[p.length - 1] == ".") {
        if (s.includes(p.slice(0, -1))) {
            return true
        } else {
            return false
        }
    } else {
        
        if (s == p) {
            return true
        } else {
            return false
        }
    }
};

console.log(isMatch('aa','ab.')) 